#Function ShortCuts
Add=ExpScope.AddParameter
Get=ExpScope.GetValue
Link = ExpScope.LinkFields

#spectrometer
Add("spectrometer.BoField", 600.13) # B0 field (MHz)
Add("spectrometer.ProtonCarrier", 2821.0) # Proton Carrier (Hz)

#spectrometer.hardware
Add("spectrometer.hardware.type", "Avance III")

#spectrometer.software
Add("spectrometer.software.os", "Linux") # Used to determine new line character for example

# The auxilary components will be coppied into appropriate subdirectories of this folder
# file -> folder
# macros -> mac
# pulprog -> pp
# spnamx -> wave
# cpdprgx -> cpd
# fq1list -> f1
# TopSpin must be configured to search these folders for corresponding files
Add("spectrometer.software.homedir", "/opt/topspin2.1.6/exp/stan/nmr/lists/")
#alternatively you can specify custom folder for each type of file
#you don't have to specify all of them, those that are missing will be derived from homedir as described before
Add("spectrometer.software.homedir.macro", "/opt/topspin2.1.6/exp/stan/nmr/lists/mac/")
Add("spectrometer.software.homedir.pulprog", "/opt/topspin2.1.6/exp/stan/nmr/lists/pp/")
Add("spectrometer.software.homedir.spnam", "/opt/topspin2.1.6/exp/stan/nmr/lists/wave/")
Add("spectrometer.software.homedir.cpdprg", "/opt/topspin2.1.6/exp/stan/nmr/lists/cpd/")
Add("spectrometer.software.homedir.fq1list", "/opt/topspin2.1.6/exp/stan/nmr/lists/f1/")
Add("spectrometer.software.homedir.scripts", "/opt/topspin2.1.6/exp/stan/nmr/lists/script/")

# These used to determine whether to use in_010 parameter or not.
Add("spectrometer.software.Program", "TopSpin")
Add("spectrometer.software.Version", "2.1")

#spectrometer (Channels)
Add("spectrometer.f1.hardpulse", 8.61)
Add("spectrometer.f1.powerlevel", -1.)
Add("spectrometer.f1.offsetname", "o1p")
Add("spectrometer.f2.hardpulse", 49) # was 40@-3.2
Add("spectrometer.f2.powerlevel", -1.44)
Add("spectrometer.f2.offsetname", "o2p")
Add("spectrometer.f2.channelname", "f2") # do not change this. required for channel switching
Add("spectrometer.f3.hardpulse", 15)
Add("spectrometer.f3.powerlevel", -0.9)
Add("spectrometer.f3.offsetname", "o3p")
Add("spectrometer.f3.channelname", "f3")  # do not change this. required for channel switching
# f4 sometimes used for H2 decoupling
Add("spectrometer.f4.hardpulse", 0)
Add("spectrometer.f4.powerlevel", 120)
Add("spectrometer.f4.offsetname", "o4p")
Add("spectrometer.f4.channelname", "f4")  # do not change this. required for channel switching

#spectrometer.channels (Nuclei)
# Defines the order of channels. Change links if channel wiring is different.
Link("spectrometer.channels.H1", "spectrometer.f1")
Link("spectrometer.channels.N15", "spectrometer.f2")
Link("spectrometer.channels.C13", "spectrometer.f3")
Link("spectrometer.channels.H2", "spectrometer.f4")

#spectrometer.pulses
Add("spectrometer.pulses.watergate90", 1000*700.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.COdec90", 300*700.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.Ncpd90", 200*600.13/Get("spectrometer.BoField")) # was 120*700.13
Add("spectrometer.pulses.Ccpd90", 85*700.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.Hcpd90", 80*700.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.Dcpd90", 300.0*700.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.Htoscsy90", 25*700.13/Get("spectrometer.BoField"))

#Bruker Pulses
Add("spectrometer.pulses.bru_CaCb_180", 21*750.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.bru_CaCb_90", 308*750.13/Get("spectrometer.BoField"))
Add("spectrometer.pulses.bru_Crp60", 500*600.13/Get("spectrometer.BoField"))

#Indirect chemical shift references
#From "Protein NMR Spectroscopy" by J. Cavanagh
Add("spectrometer.indirectCSreference.H2", 0.153506088)
Add("spectrometer.indirectCSreference.C13", 0.251449530)
Add("spectrometer.indirectCSreference.N15", 0.101329118)
Add("spectrometer.inderectCSreference.P31", 0.404808636)